<?php

include 'database.php';

	$sql = "SELECT * FROM pizza";
	$result = mysqli_query($dbcon, $sql);
	
	if(isset($_SESSION['members'])){
		if($_SESSION['members']['niveau_id'] >= 3){
	
			echo "<table>";
			echo "<tr> <th>Pizza</th> <th>Delete</th>";			
			
			while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)){
				
				echo "<tr><td>";
				echo $row['name'];
				echo "</td><td>";			
				echo "<form action='update_aanbieding.php' method='post'> <input type='checkbox' name='checkbox[]' id='checkbox[]' value='".$row['id']."' />";
				echo "</td></tr>";
			}
			echo "</table>";
			
			echo "<input id='delete' type='submit' class='button' name='delete' value='Update'/></form>";
			echo "</div>";	
		}	
	}		



?>